package com.zhuangjie.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 购物车项
 * </p>
 *
 * @author zhuangjie
 * @since 2023-10-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("shopping_cart")
@ApiModel(value="ShoppingCart对象", description="购物车项")
public class ShoppingCart implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
      @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "用户表_用户id")
    @TableField("user_id")
    private Long userId;

    @TableField("shop_id")
    private Long shopId;

    @ApiModelProperty(value = "商品名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "商品图片路径")
    @TableField("image")
    private String image;

    @ApiModelProperty(value = "菜品口味")
    @TableField("dish_flavor")
    private String dishFlavor;

    @ApiModelProperty(value = "商品数量")
    @TableField("count")
    private Integer count;

    @ApiModelProperty(value = "商品原价")
    @TableField("old_price")
    private BigDecimal oldPrice;

    @ApiModelProperty(value = "商品现价")
    @TableField("now_price")
    private BigDecimal nowPrice;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_time")
    private LocalDateTime updateTime;


}
